<template>
  <div class="md180411-cj-item">
    <div class="title">
      <img src="http://kidtts.tmooc.cn/script/css/rep/img/w_t01.png" v-if="phaseInfo.lesson % 4 != 0">
      <img src="http://kidtts.tmooc.cn/script/css/rep/img/m_t02.png" v-else>
    </div>
    <!-- 知识点 -->
    <div class="content">
      <ul class="md180411-cj-info">
        <li class="item clearfix" v-for="(item, index) in knowInfo" :key="index">
          <span class="pull-left point">{{index+1}}</span>
          <p class="font-16 cont">{{item}}</p>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'know',
    props: ['phaseInfo'],
    data () {
      return {
        knowInfo: []
      }
    },
    created () {
      let self = this
      let phase = this.phaseInfo
      self.$config.lessonData[phase.grade][phase.level].forEach(function (item) {
        if (phase.lesson % 4 === 0 && phase.lesson - 4 <= item.lesson && item.lesson <= phase.lesson) {
          self.knowInfo = self.knowInfo.concat(item.content)
        } else if (phase.lesson === item.lesson) {
          self.knowInfo = self.knowInfo.concat(item.content)
        }
      })
    }
  }
</script>

<style scoped>

</style>
